package com.eastone.user.serverapi.listener;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * @author liuxiangfei
 * @date 2016年7月20日 下午4:16:35
 * @version 1.0.0
 */
public class SessionListener implements HttpSessionListener {
	public static SessionContext sessionContext = SessionContext.getInstance();

	@Override
	public void sessionCreated(HttpSessionEvent httpSessionEvent) {
		sessionContext.AddSession(httpSessionEvent.getSession());
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
		sessionContext.DelSession(httpSessionEvent.getSession());
	}

}
